package com.leyou.common.pojo;

import java.util.List;

/**
 * 创建分页工具类，在其他服务需要引入leyou-common的依赖
 * @Author Allen-fanxin
 * @Date 2020/9/23 10:54
 * @params
 * @Since version-1.0
 */
public class PageResult<T> {
    private Long total;
    private Integer totalPage;
    private List<T> items;//当前页面的数据

    public PageResult() { }

    public PageResult(Long total, Integer totalPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }

    public PageResult(Long total, List<T> items) {
        this.total = total;
        this.items = items;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }
}
